<div class="box-labels titlebar">
    <div class="head">
        <h3><b>标签</b></h3>
    </div>
    <div class="cont">
        <ul>
        {volist name="labels" id="vo"}
            <li><a href="{:url('index/news/index',['label_id' => $vo['label_id']])}" title="{$vo.name}" class="btn btn-default btn-sm">{$vo.name}</a></li>
        {/volist}
        </ul>
    </div>
    <p class="toogle">
        <a href="javascript:;" class="spread">展开全部</a>
    </p>
</div>
<script type="text/javascript" src="__JS__/jquery-2.1.4.min.js"></script>
<script type="text/javascript">
    $(".box-labels .toogle a").click(function(){

        if ($(this).hasClass("spread")) {
            $(".box-labels .cont").css("height", "auto");
            $(this).removeClass("spread");
            $(this).text("收起全部");
        }else{
            $(".box-labels .cont").css("height", "195px");
            $(this).addClass("spread");
            $(this).text("展开全部");
        }

    })


</script>